/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package d20chat;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;

/**
 *
 * @author YPC
 */
class ExtraSettings {

    public boolean useColon;
    public boolean useSN;
    public boolean colorAll;

    public ExtraSettings(D20Chatui theGui) {
        boolean settings = (new File("extraSettings.txt")).exists();

        if ( settings )
        {
            try
            {
                // Create a buffer for our file to read into
                BufferedReader bin = new BufferedReader(new FileReader("extraSettings.txt"));

                // Read each setting
                String tempString = bin.readLine();
                useColon = Boolean.parseBoolean(tempString);
                tempString = bin.readLine();
                useSN = Boolean.parseBoolean(tempString);
                tempString = bin.readLine();
                colorAll = Boolean.parseBoolean(tempString);
            } catch (Exception e)
            {
                System.err.println ("Error reading file " + "extraSettings.txt");
            }
        }
        else
        {
            useColon = false;
            useSN = false;
            colorAll = false;
        }
    }


}
